{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}EasyTesting{% endblock %}</title>
{#    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">#}
{#    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">#}
    <link href="{% static 'css/bootstrap.min.css' %} " rel="stylesheet">
    <link rel="stylesheet" href="{% static 'css/bootstrap-icons.css' %}">
    <link rel="stylesheet" href="/static/css/custom.css">
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --success-color: #4cc9f0;
            --info-color: #4895ef;
            --warning-color: #f72585;
            --danger-color: #e63946;
            --light-color: #f8f9fa;
            --dark-color: #212529;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fb;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .auth-header {
            padding: 1rem 0;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
        }

        .auth-footer {
            margin-top: auto;
            padding: 1.5rem 0;
            background-color: #fff;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
        }

        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary:hover {
            background-color: var(--secondary-color);
            border-color: var(--secondary-color);
        }

        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
        }

        .card {
            border-radius: 10px;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        }
    </style>
    {% block extra_css %}{% endblock %}
</head>
<body>
<header class="auth-header">
    <div class="container">
        <div class="d-flex justify-content-between align-items-center">
            <a href="/" class="text-white text-decoration-none">
                <h4 class="mb-0"><i class="bi bi-speedometer2 me-2"></i>EasyTesting</h4>
            </a>
            <div>
                {% if user.is_authenticated %}
                    <a href="{% url 'dashboard' %}" class="btn btn-outline-light btn-sm">
                        <i class="bi bi-speedometer2 me-1"></i>仪表盘
                    </a>
                    <a href="{% url 'logout' %}" class="btn btn-outline-light btn-sm ms-2">
                        <i class="bi bi-box-arrow-right me-1"></i>退出
                    </a>
                {% else %}
                    <a href="{% url 'login' %}" class="btn btn-outline-light btn-sm">
                        <i class="bi bi-box-arrow-in-right me-1"></i>登录
                    </a>
                    <a href="{% url 'register' %}" class="btn btn-outline-light btn-sm ms-2">
                        <i class="bi bi-person-plus me-1"></i>注册
                    </a>
                {% endif %}
            </div>
        </div>
    </div>
</header>

<main class="flex-grow-1 py-4">
    {% block content %}{% endblock %}
</main>

<footer class="auth-footer">
    <div class="container">
        <div class="row">
            <div class="col-md-6">
                <p class="mb-0">&copy; {% now "Y" %} EasyTesting. 保留所有权利。</p>
            </div>
            <div class="col-md-6 text-md-end">
                <a href="#" class="text-decoration-none text-muted me-3">隐私政策</a>
                <a href="#" class="text-decoration-none text-muted me-3">使用条款</a>
                <a href="#" class="text-decoration-none text-muted">帮助</a>
            </div>
        </div>
    </div>
</footer>

{#<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>#}
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
<script src="{% static 'js/chart.min.js' %}"></script>
{% block extra_js %}{% endblock %}
</body>
</html>
